package com.edu.test.reflect.edu01;

import com.edu.pojo.Ksxx;

import java.lang.reflect.Field;

/**
 * @作者 five-five
 * @创建时间 2020/12/23
 */
public class getAllFields {
    public static void main(String[] args) {
        TXgZsfwTzKsxx xgZsfwTzKsxx = new TXgZsfwTzKsxx();
        Ksxx ksxx = new Ksxx();
        Class<? extends TXgZsfwTzKsxx> aClass = xgZsfwTzKsxx.getClass();
//        Class<? extends Ksxx> aClass = ksxx.getClass();
        Field[] fields = aClass.getDeclaredFields();
        for (Field field : fields) {
            System.out.println(field.getName()+":"+field.getType());
        }
    }
}
